{extend name='admin@main'}

{block name="button"}
{if auth("admin/extension/extensionAdd")}
<button data-modal='{:url("extensionAdd")}' data-title="添加分组" class='layui-btn layui-btn-sm layui-btn-primary'>添加分组</button>
{/if}
{/block}

{block name="content"}
<div class="think-box-shadow">
    {include file='extension/index_search'}
    <table class="layui-table margin-top-10" lay-skin="line">
        <thead>
            <tr>
                <th>分组ID</th>
                <th>分组名称</th>
                <th>添加时间</th>
                <th>操作</th>
            </tr>
        </thead>
        <tbody>
        {foreach $list as $key=>$vo}
        <tr>
            <td>{$vo.id}</td>
            <td>{$vo.name}</td>
            <td>{$vo.created_at|date='Y-m-d'}</td>
            <td>
            {if auth("admin/extension/edit")}
            <a data-title="编辑分类" class="layui-btn layui-btn-sm" data-modal='{:url("edit")}?id={$vo.id}'>编 辑</a>
            {/if}
            </td>
        </tr>
        {/foreach}
        
        
        </tbody>
    </table>
    {empty name='list'}<span class="notdata">没有记录哦</span>{else}{$pagehtml|raw|default=''}{/empty}
</div>
{/block}
